#pragma once

#include "../_inc_app/CtrlCheck.h"

#include "../_inc_util/UtilTime.h"
#include "../_inc/def_interface.h"
#include "ListMgr.h"

// CWndSearchOpt

class CWndSearchOpt : public CWnd
{
	DECLARE_DYNAMIC(CWndSearchOpt)

private:
	CFont				m_ListFont;

	CCtrlCheck m_chkRecType[MAX_REC_TYPE];
	BOOL m_bRecType[MAX_REC_TYPE];

	CUtilTime			m_UtilTime;
	BOOL				m_bOptTime;

	//////////////////////////////////////////////////////////////////////////
	//for UI
	CPen m_penBorder, m_penBox;
	CBrush m_burshBox;
	int m_nDlgWidth, m_nDlgHeight;
	DWORD m_dwTextColorNormal, m_dwTextColorDisabled;

	CListMgr *m_pListMgr;

	int m_nMode;

public:
	CWndSearchOpt();
	virtual ~CWndSearchOpt();

	void SetListMgr(CListMgr *pListMgr) { m_pListMgr = pListMgr; };
	void SetOptTime();
	void SetOptEvent();
	void UpdateControl();
	void UpdateSwapControl();

	BOOL IsChecked(DWORD dwRecType)		{ return m_bRecType[dwRecType]; };

	void RefreshLang();

protected:
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	afx_msg void OnPaint();
	afx_msg long OnCtlMessage(UINT wParam, LONG lParam);
	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
};


